package com.csx.governance.sample.serviceA;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.loadbalancer.core.CachingServiceInstanceListSupplier;
import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author cuisongxu
 * @date 2023/4/2 18:45
 */
@SpringBootApplication
@EnableFeignClients
public class ServiceAApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ServiceAApplication.class, args);
//        ServiceInstanceListSupplier discoveryClientServiceInstanceListSupplier = applicationContext.getBean("discoveryClientServiceInstanceListSupplier", ServiceInstanceListSupplier.class);
        Object discoveryClientServiceInstanceListSupplier = applicationContext.getBean("discoveryClientServiceInstanceListSupplier");
        System.out.println(discoveryClientServiceInstanceListSupplier);
    }
}
